package it.hopeless.jee6.persistence;

import javax.persistence.*;

/**
 * Created by IntelliJ IDEA.
 * User: Matteo
 * Date: 27-apr-2010
 * Time: 15.51.46
 */
@Entity
@SecondaryTable(name = "PRICE")
public class Book {
    @Id
    private Long id;
    private String title;
    @Enumerated(EnumType.STRING)
    private Genre genre;
    @Column(table = "PRICE")
    private Double price;

    public Book() {}

    public Book(Long id, String title, Genre genre, Double price) {
        this.id = id;
        this.title = title;
        this.genre = genre;
        this.price = price;
    }

    public Long getId() {
        return id;
    }

    public String getTitle() {
        return title;
    }
}
